home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8460 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1021 b   |  42 lines

  1. Path: news.iconn.net!news
  2. From: thecrow@iconn.net (The Crow)
  3. Newsgroups: comp.lang.c++
  4. Subject: trouble with command line args, need help
  5. Date: 18 Feb 1996 21:20:56 GMT
  6. Organization: I rule the world
  7. Message-ID: <4g857p$omf@news.iconn.net>
  8. NNTP-Posting-Host: st-ts00-02.iconn.net
  9. Mime-Version: 1.0
  10. Content-Type: Text/Plain; charset=US-ASCII
  11. X-Newsreader: WinVN 0.99.6
  12.  
  13. Hey, I have a program that has three strings defined as such
  14.  
  15. char key[80];
  16. char ifn[12];
  17. char ed[1];
  18.  
  19. Then I read in the command line arguments in the main function like so:
  20.  
  21. main(int argc, char* argv[])  {
  22. blablabla
  23. }
  24.  
  25. then inside the main function I try to do this
  26.  
  27. ifn = argv[1];
  28. ed = argv[2];
  29. key = argv[3];
  30.  
  31.  
  32. I get an error about Lvalues in function main. I have tried adding little 
  33. stars all over the place and different combinations but I either get the Lvalue
  34. error or something about near pointers.  I just want to dump the command line
  35. arguments in the strings. How do I do?
  36.  
  37. -- 
  38. The Crow - thecrow@iconn.net
  39. "It can't rain all the time"
  40.  
  41.  
  42.